CCOPT = -O2

LPTOUT_DIR = "/usr/local/bin/"
LPTOUT_BIN = "lptout"
PLUGIN_DIR = "/usr/lib/audacious/Visualization/"

all: lptleds.so lptout

install: all
	cp -f lptleds.so ${PLUGIN_DIR}
	cp -f lptout ${LPTOUT_DIR}
	chmod +s ${LPTOUT_DIR}${LPTOUT_BIN}

lptleds.so: lptleds.c
	gcc ${CCOPT} -shared `pkg-config --cflags --libs gtk+-2.0` `pkg-config audacious --libs` `pkg-config audacious --cflags` -o lptleds.so lptleds.c

lptout: lptout.c
	gcc ${CCOPT} -o lptout lptout.c

clean:
	rm -f *.o lptleds.so lptout
